package com.bristua.common.model.condition;

import java.util.ArrayList;
import java.util.List;

public class TDictionaryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TDictionaryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDictionaryIdIsNull() {
            addCriterion("dictionary_id is null");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdIsNotNull() {
            addCriterion("dictionary_id is not null");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdEqualTo(String value) {
            addCriterion("dictionary_id =", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdNotEqualTo(String value) {
            addCriterion("dictionary_id <>", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdGreaterThan(String value) {
            addCriterion("dictionary_id >", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdGreaterThanOrEqualTo(String value) {
            addCriterion("dictionary_id >=", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdLessThan(String value) {
            addCriterion("dictionary_id <", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdLessThanOrEqualTo(String value) {
            addCriterion("dictionary_id <=", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdLike(String value) {
            addCriterion("dictionary_id like", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdNotLike(String value) {
            addCriterion("dictionary_id not like", value, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdIn(List<String> values) {
            addCriterion("dictionary_id in", values, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdNotIn(List<String> values) {
            addCriterion("dictionary_id not in", values, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdBetween(String value1, String value2) {
            addCriterion("dictionary_id between", value1, value2, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryIdNotBetween(String value1, String value2) {
            addCriterion("dictionary_id not between", value1, value2, "dictionaryId");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyIsNull() {
            addCriterion("dictionary_key is null");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyIsNotNull() {
            addCriterion("dictionary_key is not null");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyEqualTo(String value) {
            addCriterion("dictionary_key =", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyNotEqualTo(String value) {
            addCriterion("dictionary_key <>", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyGreaterThan(String value) {
            addCriterion("dictionary_key >", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyGreaterThanOrEqualTo(String value) {
            addCriterion("dictionary_key >=", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyLessThan(String value) {
            addCriterion("dictionary_key <", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyLessThanOrEqualTo(String value) {
            addCriterion("dictionary_key <=", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyLike(String value) {
            addCriterion("dictionary_key like", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyNotLike(String value) {
            addCriterion("dictionary_key not like", value, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyIn(List<String> values) {
            addCriterion("dictionary_key in", values, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyNotIn(List<String> values) {
            addCriterion("dictionary_key not in", values, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyBetween(String value1, String value2) {
            addCriterion("dictionary_key between", value1, value2, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryKeyNotBetween(String value1, String value2) {
            addCriterion("dictionary_key not between", value1, value2, "dictionaryKey");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueIsNull() {
            addCriterion("dictionary_value is null");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueIsNotNull() {
            addCriterion("dictionary_value is not null");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueEqualTo(String value) {
            addCriterion("dictionary_value =", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueNotEqualTo(String value) {
            addCriterion("dictionary_value <>", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueGreaterThan(String value) {
            addCriterion("dictionary_value >", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueGreaterThanOrEqualTo(String value) {
            addCriterion("dictionary_value >=", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueLessThan(String value) {
            addCriterion("dictionary_value <", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueLessThanOrEqualTo(String value) {
            addCriterion("dictionary_value <=", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueLike(String value) {
            addCriterion("dictionary_value like", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueNotLike(String value) {
            addCriterion("dictionary_value not like", value, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueIn(List<String> values) {
            addCriterion("dictionary_value in", values, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueNotIn(List<String> values) {
            addCriterion("dictionary_value not in", values, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueBetween(String value1, String value2) {
            addCriterion("dictionary_value between", value1, value2, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionaryValueNotBetween(String value1, String value2) {
            addCriterion("dictionary_value not between", value1, value2, "dictionaryValue");
            return (Criteria) this;
        }

        public Criteria andDictionarySortIsNull() {
            addCriterion("dictionary_sort is null");
            return (Criteria) this;
        }

        public Criteria andDictionarySortIsNotNull() {
            addCriterion("dictionary_sort is not null");
            return (Criteria) this;
        }

        public Criteria andDictionarySortEqualTo(Integer value) {
            addCriterion("dictionary_sort =", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortNotEqualTo(Integer value) {
            addCriterion("dictionary_sort <>", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortGreaterThan(Integer value) {
            addCriterion("dictionary_sort >", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortGreaterThanOrEqualTo(Integer value) {
            addCriterion("dictionary_sort >=", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortLessThan(Integer value) {
            addCriterion("dictionary_sort <", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortLessThanOrEqualTo(Integer value) {
            addCriterion("dictionary_sort <=", value, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortIn(List<Integer> values) {
            addCriterion("dictionary_sort in", values, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortNotIn(List<Integer> values) {
            addCriterion("dictionary_sort not in", values, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortBetween(Integer value1, Integer value2) {
            addCriterion("dictionary_sort between", value1, value2, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andDictionarySortNotBetween(Integer value1, Integer value2) {
            addCriterion("dictionary_sort not between", value1, value2, "dictionarySort");
            return (Criteria) this;
        }

        public Criteria andParentIdIsNull() {
            addCriterion("parent_id is null");
            return (Criteria) this;
        }

        public Criteria andParentIdIsNotNull() {
            addCriterion("parent_id is not null");
            return (Criteria) this;
        }

        public Criteria andParentIdEqualTo(String value) {
            addCriterion("parent_id =", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdNotEqualTo(String value) {
            addCriterion("parent_id <>", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdGreaterThan(String value) {
            addCriterion("parent_id >", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdGreaterThanOrEqualTo(String value) {
            addCriterion("parent_id >=", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdLessThan(String value) {
            addCriterion("parent_id <", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdLessThanOrEqualTo(String value) {
            addCriterion("parent_id <=", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdLike(String value) {
            addCriterion("parent_id like", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdNotLike(String value) {
            addCriterion("parent_id not like", value, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdIn(List<String> values) {
            addCriterion("parent_id in", values, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdNotIn(List<String> values) {
            addCriterion("parent_id not in", values, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdBetween(String value1, String value2) {
            addCriterion("parent_id between", value1, value2, "parentId");
            return (Criteria) this;
        }

        public Criteria andParentIdNotBetween(String value1, String value2) {
            addCriterion("parent_id not between", value1, value2, "parentId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}